*===============================================================================
* Paper   : In Strongman We Trust: The Political Legacy of the New Village Movement in South Korea
* Authors : Hong, Ji Yeon, Sunkyoung Park and Hyunjoo Yang
* Date    : April 22 2025
* Please direct questions to sunkyoung_park@korea.ac.kr
* This do-file is to produce empirical outcome with a new dataset we have corrected our error. Please refer to the Erratum for more information.
*===============================================================================
clear all
set more off

* set working directory to the folder where you download the data.
* cd "c:/Users/skpar/Dropbox/smu_voting/smu_voting/0_correction"

log using "5_result_log", text


use 1_master_data


*===============================================================================
* Variable Recoding
*===============================================================================

*================================================================
* Dependent Variables 
*================================================================
* (1) Delta incumbent share 1978 - 1973 (Variable Name = D_TopSh_78_73)
gen E9TopSh = (E9gongwha1 + E9gongwha2)/E9total
gen E10TopSh = (E10gongwha1)/E10total

gen D_TopSh_78_73 = E10TopSh - E9TopSh

label variable E9TopSh "Vote share of Incumbent Party in 1973"
label variable E10TopSh "Vote share of Incumbent Party in 1978"
label variable D_TopSh_78_73 "Delta vote share 1978-1973"


* (2) Delta incumbent - oppositions 1978-1973 (Variable Name = D_voteDiffSh_78_73_re)

gen voteDiff_E10=E10gongwha1 - (E10sinmin1 + E10sinmin2 + E10mintong1 + E10indep1 ///
+ E10indep2 + E10indep3 + E10indep4 + E10indep5 + E10indep6 + E10indep7 + E10indep8)

gen voteDiffSh_E10 = voteDiff_E10/E10vote

gen voteDiff_E9=E9gongwha1 + E9gongwha2 - (E9sinmin1 + E9sinmin2 + E9mintong1 ///
+ E9indep1 + E9indep2 + E9indep3 + E9indep4 + E9indep5)

gen voteDiffSh_E9 = voteDiff_E9/E9vote

gen D_voteDiffSh_78_73_re = voteDiffSh_E10 - voteDiffSh_E9


label variable voteDiff_E10 "Vote Difference: Incumbent Party - All Oppositions, in 1978"
label variable voteDiffSh_E10 "Share voteDiff_E10"
label variable voteDiff_E9 "Vote Difference: Incumbent Party - All Oppositions, in 1973"
label variable voteDiffSh_E9 "Share of voteDiff_E9"

label variable D_voteDiffSh_78_73_re "Delta Vote Difference: 1978-1973"



* (3) Park share in 2012 (Variable Name = E18ConsSh)
gen E18ConsSh = E18park_gh / E18total

label variable E18ConsSh "Park's vote share in 2012"

* (4) Park - others vote share in 2012 (Variable Name = E18_VoteDiff)
gen E18_VoteDiff =  (E18park_gh - (E18moon_ji + E18park_js + E18kim_sy + E18kang_jw + E18kim_sj))/E18total

label variable E18_VoteDiff "Park - Oppositions"





*================================================================
* Independent Variables 
*================================================================

* (5) Log(transfer+1) per voter in each year

gen amt_per_elct1974 = amount1974 / E9electorate
gen amt_per_elct1975 = amount1975 / E9electorate
gen amt_per_elct1976 = amount1976 / E9electorate
gen amt_per_elct1977 = amount1977 / E9electorate
gen amt_per_elct1978 = amount1978 / E9electorate

label variable amt_per_elct1974 "NVM subsidy per voter in 1974" 
label variable amt_per_elct1975 "NVM subsidy per voter in 1975"
label variable amt_per_elct1976 "NVM subsidy per voter in 1976"
label variable amt_per_elct1977 "NVM subsidy per voter in 1977"
label variable amt_per_elct1978 "NVM subsidy per voter in 1978"

gen Lamt_per_elct1974 = log(amt_per_elct1974+1)
gen Lamt_per_elct1975 = log(amt_per_elct1975+1)
gen Lamt_per_elct1976 = log(amt_per_elct1976+1)
gen Lamt_per_elct1977 = log(amt_per_elct1977+1)
gen Lamt_per_elct1978 = log(amt_per_elct1978+1)


label variable Lamt_per_elct1974 "NVM subsidy per voter in 1974 (log)"
label variable Lamt_per_elct1975 "NVM subsidy per voter in 1975 (log)"
label variable Lamt_per_elct1976 "NVM subsidy per voter in 1976 (log)"
label variable Lamt_per_elct1977 "NVM subsidy per voter in 1977 (log)"
label variable Lamt_per_elct1978 "NVM subsidy per voter in 1978 (log)"


* (6) Log(transfer+1) per population in each year

gen amount1974_d_pop = amount1974 / d_pop_70
gen amount1975_d_pop = amount1975 / d_pop_75
gen amount1976_d_pop = amount1976 / d_pop_75
gen amount1977_d_pop = amount1977 / d_pop_75
gen amount1978_d_pop = amount1978 / d_pop_75
gen amount1979_d_pop = amount1979 / d_pop_80


label variable amount1974_d_pop "NVM subsidy per population in 1974"
label variable amount1975_d_pop "NVM subsidy per population in 1975"
label variable amount1976_d_pop "NVM subsidy per population in 1976"
label variable amount1977_d_pop "NVM subsidy per population in 1977"
label variable amount1978_d_pop "NVM subsidy per population in 1978"
label variable amount1979_d_pop "NVM subsidy per population in 1979"


gen Lamount1974_d_pop = log(1+amount1974_d_pop)
gen Lamount1975_d_pop = log(1+amount1975_d_pop)
gen Lamount1976_d_pop = log(1+amount1976_d_pop)
gen Lamount1977_d_pop = log(1+amount1977_d_pop)
gen Lamount1978_d_pop = log(1+amount1978_d_pop)
gen Lamount1979_d_pop = log(1+amount1979_d_pop)

label variable Lamount1974_d_pop "NVM subsidy per population in 1974 (log)"
label variable Lamount1975_d_pop "NVM subsidy per population in 1975 (log)"
label variable Lamount1976_d_pop "NVM subsidy per population in 1976 (log)"
label variable Lamount1977_d_pop "NVM subsidy per population in 1977 (log)"
label variable Lamount1978_d_pop "NVM subsidy per population in 1978 (log)"
label variable Lamount1979_d_pop "NVM subsidy per population in 1979 (log)"



* (7) number of beneficiary villages per voter in each year
gen num_1974PERpop=num_vil1974 / E9electorate 
gen num_1975PERpop=num_vil1975 / E9electorate
gen num_1976PERpop=num_vil1976 / E9electorate
gen num_1977PERpop=num_vil1977 / E9electorate
gen num_1978PERpop=num_vil1978 / E10electorate
gen num_1979PERpop=num_vil1979 / E10electorate


label variable num_1974PERpop "Number of beneficiary vaillges per voter (1974)"
label variable num_1975PERpop "Number of beneficiary vaillges per voter (1975)"
label variable num_1976PERpop "Number of beneficiary vaillges per voter (1976)"
label variable num_1977PERpop "Number of beneficiary vaillges per voter (1977)"
label variable num_1978PERpop "Number of beneficiary vaillges per voter (1978)"
label variable num_1979PERpop "Number of beneficiary vaillges per voter (1979)"


* (8)  Log(transfer+1) per voter, Combined 1974-1978
gen total_Lamount_1974_1978_perelect = log(amt_per_elct1974+amt_per_elct1975+amt_per_elct1976+amt_per_elct1977+amt_per_elct1978+1)

label variable total_Lamount_1974_1978_perelect "NVM subsidy per voter (total)"



* (9) Log(transfer+1) per population, Combined 1974-1978
gen total_Lamount_1974_1978_d_pop = log(amount1974_d_pop + amount1975_d_pop + amount1976_d_pop + amount1977_d_pop + amount1978_d_pop + 1)


label variable total_Lamount_1974_1978_d_pop  "NVM subsidy per population (total)"

* (10) number of beneficiary villages per voter, Combined 1974-1978
gen total_num_1974_1978_perelect = (num_1974PERpop + num_1975PERpop + num_1976PERpop + num_1977PERpop + num_1978PERpop)

label variable total_num_1974_1978_perelect "Number of beneficiary vaillges per voter (total)"



*================================================================
* Controls 1 
*================================================================
* (11) area in 1970
label variable  area_1970 "Area in 1970"

* (12) generate eup dummy (as of 1975)
gen eup = (TWN_type=="읍")

label variable eup "eup in 1970"
 

*================================================================
* Controls 2 
*================================================================

* (13) Pop female share in 1966
gen demo_female_share_1966 = demo_female_tot_1966 / demo_pop_tot_1966

label variable demo_female_share_1966 "Female pop share in 1966"

* (14) Pop age +15 share in 1966

gen demo_age_15plus_1966 = demo_adult_1966 / demo_pop_tot_1966

label variable demo_age_15plus_1966 "Share of pop aged 15+ in 1966"


* (15) Pop share illeterate in 1966
gen demo_illiterate_1966 = demo_n_illiterate_1966 / demo_uneducated_1966
 replace demo_illiterate_1966=.  if demo_uneducated_1966 == demo_n_illiterate_1966


label variable demo_illiterate_1966 "Illiterate pop share in 1966"


* (16) Pop change in 1970-1966
gen demo_pop_ch_1970_1966 = (d_pop_70 - demo_pop_tot_1966) / demo_pop_tot_1966

label variable demo_pop_ch_1970_1966 "Pop change 1966-1970"


* (17) govtparty_E9 
gen govtparty_E9 = (E9gongwha1+E9gongwha2)/E9vote

label variable govtparty_E9 "Incumbent vote share in 1973"

gen govtpartySQ_E9 =  govtparty_E9* govtparty_E9

label variable govtpartySQ_E9 "Square of Incumbent vote share in 1973"



*================================================================
* Variables used in mechanism section 
*================================================================
* (18) Lee share in 2007 
gen E17ConsSh = E17lee_mb / E17total

label variable E17ConsSh  "Lee's vote share"


* (20) nightlight 
forvalues yr = 1992/2013 {
    gen Lnl`yr'mean = log(nl`yr'mean + 1)
	label variable Lnl`yr'mean "`yr' night-time luminosity (log)"

}


* (21) cultivators 
foreach y in 1970 1980 2010 {
 gen cul_`y' = cul_hh_`y' / household_`y'
    gen Lcul_`y' = log(cul_`y' + 1)
    label variable cul_`y' "Share of household w Cultivator in `y'"
	label variable Lcul_`y' "Share of household w Cultivator in `y' (log)"
}
   
gen cul_197080 = cul_1980 - cul_1970

label variable cul_197080 "Cultivator (1970-80)"


* (22) Full time farming : ful_2010
foreach y in 1970 1980 2010 {
    gen ful_`y' = fp_full_`y' / household_`y'
	label variable ful_`y' "Share of full-time farming household in `y'"

    gen Lful_`y' = log(ful_`y' + 1)
	label variable Lful_`y' "Share of full-time farming household in `y' (log)"
}



* (23) change in number of agricultural population (1980 - 1970)
gen agpop_ch_8070 = log(ag_pop_tot_1980) - log(ag_pop_tot_1970) 

label variable agpop_ch_8070 "change in agricultural population (log, 1970 - 80)"

* (24) pop_old_55_plus_share_2010 
egen pop_old_50_plus_2010 = rowtotal( ///
demo_pop_5054_2010 demo_pop_5559_2010 demo_pop_6064_2010 demo_pop_6569_2010 ///
demo_pop_7074_2010 demo_pop_7579_2010 demo_pop_8084_2010 demo_pop_8500_2010)

gen pop_old_50_plus_share_2010 = pop_old_50_plus_2010 / pop_tot_2010

egen pop_old_55_plus_2010 = rowtotal( ///
demo_pop_5559_2010 demo_pop_6064_2010 demo_pop_6569_2010 ///
demo_pop_7074_2010 demo_pop_7579_2010 demo_pop_8084_2010 demo_pop_8500_2010)

gen pop_old_55_plus_share_2010 = pop_old_55_plus_2010 / pop_tot_2010

label variable pop_old_50_plus_2010 "Population age 50+ in 2010"
label variable pop_old_50_plus_share_2010 "Share of population age 50+ in 2010"
label variable pop_old_55_plus_2010 "Population age 55+ in 2010"
label variable pop_old_55_plus_share_2010 "Share of population age 55+ in 2010"


* (25) Instrumental Variables 
gen ts_median1 = ts_median/1000
gen te_median1 = te_median/1000

label variable ts_median1 "Terrain Slope"
label variable te_median1 "Terrain Elevation"






*===============================================================================
* Empirical Analysis 
*===============================================================================


*===============================================================================
* Appendix Table B1 
*===============================================================================

sum D_TopSh_78_73 D_voteDiffSh_78_73_re E18ConsSh E18_VoteDiff govtparty_E9 /// outcome variable
Lamt_per_elct1974 Lamt_per_elct1975 Lamt_per_elct1976 Lamt_per_elct1977 Lamt_per_elct1978 Lamount1977_d_pop num_1977PERpop total_Lamount_1974_1978_perelect total_Lamount_1974_1978_d_pop total_num_1974_1978_perelect /// explanatory variable
area_1970 eup /// controls 1
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 demo_pop_ch_1970_1966 /// controls 2
E17ConsSh  Lnl2010mean cul_197080  cul_2010 ful_2010 agpop_ch_8070 pop_old_55_plus_share_2010 te_median1 ts_median1 /* long-term variables */


*===============================================================================
* Table 1 and Appendix Table B2
* x = NVM subsidy per voter (log) in 1977 (Lamt_per_elct1977)
* y = incumbent vote share difference in 1978 and 1973 election (D_TopSh_78_73)
*===============================================================================

reg D_TopSh_78_73 Lamt_per_elct1977, r
eststo 

areg D_TopSh_78_73 Lamt_per_elct1977, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

areg D_TopSh_78_73 Lamt_per_elct1977 area_1970 eup, absorb(CTY_cd) vce(cluster CTY_cd)
eststo


areg D_TopSh_78_73 Lamt_per_elct1977 area_1970 eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo 

esttab, b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 


*===============================================================================
* Appedix Table B3 
* x = each year NVM subsidy per voter (log) from 1974 to 1978, respectively (Lamt_per_elct1974-Lamt_per_elct1978)
* y = incumbent vote share difference in 1978 and 1973 election (D_TopSh_78_73)
*===============================================================================
eststo clear 


foreach x of var Lamt_per_elct1974-Lamt_per_elct1978  {

areg D_TopSh_78_73 `x' area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)

eststo 

}

esttab, order(Lamt_per_elct*) b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 


*===============================================================================
* Appedix Table B4 
* x = Number of beneficiary villages per voter in 1977 ( num_1977PERpop )
* x = NVM subsidy per population ( Lamount1977_d_pop )
* y = difference between the incumbent's vote share and all opposition parties' vote shares ( D_voteDiffSh_78_73 )
*================================================================
eststo clear 

* x = Number of Beneficiary villages per voter in 1977 ( num_1977PERpop )
areg D_TopSh_78_73 num_1977PERpop area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo 

* x = NVM subsidy per population ( Lamount1977_d_pop )
areg D_TopSh_78_73 Lamount1977_d_pop area_1970  eup /// 
 demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo 


* y = difference between the incumbent's vote share and all opposition parties' vote shares ( D_voteDiffSh_78_73 )

areg D_voteDiffSh_78_73_re Lamt_per_elct1977 area_1970 eup /// 
 demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo 

esttab, order(num_1977PERpop Lamount1977_d_pop Lamt_per_elct1977) b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01)  



*===============================================================================
* Appedix Table B5: the allocation of rural development cash transfers
* x = Incumbent vote share in 1973 elections 
* y = total NVM subsidy per voter 
*===============================================================================	

eststo clear 
reg total_Lamount_1974_1978_perelect govtparty_E9 ,r
eststo

areg total_Lamount_1974_1978_perelect govtparty_E9 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo

areg total_Lamount_1974_1978_perelect govtparty_E9  area_1970 eup, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

areg total_Lamount_1974_1978_perelect govtparty_E9 area_1970 eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 demo_pop_ch_1970_1966 ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo
 
areg total_Lamount_1974_1978_perelect govtparty_E9 govtpartySQ_E9 area_1970 eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 demo_pop_ch_1970_1966 ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

esttab, order(govtparty_E9 govtpartySQ_E9) b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 


*==============================================================================
* Table 2 and Appendix B6
* x = total NVM subsidy per voter  (total_Lamount_1974_1978_perelect), 
* y = Park's vote share in 2012 (E18ConsSh)
*==============================================================================
eststo clear 

reg E18ConsSh total_Lamount_1974_1978_perelect, r
eststo 

areg E18ConsSh total_Lamount_1974_1978_perelect, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

areg E18ConsSh total_Lamount_1974_1978_perelect area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo


areg E18ConsSh total_Lamount_1974_1978_perelect area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

 
esttab, b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 



*================================================================================
* Appendix Table B7
* regionalism: Models (1) and (4) for all regions, models (2) and (5) for Honam, 
* 				and Models (3) and (6) for Youngnam. 

* For Models (1) to (3),  
* x = NVM subsidy per voter in 1977  (Lamt_per_elct1977 )
* y = incumbent vote share difference in 1978 and 1973 election (D_TopSh_78_73)

* For Models (4) to (6),
* x = total NVM subsidy per voter (total_Lamount_1974_1978_perelect)
* y = Park's vote share in 2012 (E18ConsSh)
*================================================================================
eststo clear 

* 1978, all
areg D_TopSh_78_73 Lamt_per_elct1977 area_1970 eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 , absorb(CTY_cd) vce(cluster CTY_cd)
eststo 

* 1978, honam
areg D_TopSh_78_73 Lamt_per_elct1977 area_1970 eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 if (PRV_cd == 35|PRV_cd == 36), absorb(CTY_cd) vce(cluster CTY_cd)
eststo 

* 1978, yongnam
areg D_TopSh_78_73 Lamt_per_elct1977 area_1970 eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 if (PRV_cd == 37|PRV_cd == 38), absorb(CTY_cd) vce(cluster CTY_cd)
eststo 



* 2012, all
areg E18ConsSh total_Lamount_1974_1978_perelect area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

* 2012 honam
areg E18ConsSh total_Lamount_1974_1978_perelect area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh if (PRV_cd == 35|PRV_cd == 36) ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

* 2012 yongnam

areg E18ConsSh total_Lamount_1974_1978_perelect area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh if (PRV_cd == 37|PRV_cd == 38) ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo


esttab, order( Lamt_per_elct1977 total_Lamount_1974_1978_perelect )  b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 


*================================================================================
* Table 3's Models (1) and (2) and Appendix B8
*================================================================================
eststo clear 

 
mixed E18ConsSh total_Lamount_1974_1978_perelect area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966  || PRV_cd: || CTY_cd:
eststo

 
 
mixed E18ConsSh total_Lamount_1974_1978_perelect area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh|| PRV_cd: || CTY_cd:
eststo


esttab, keep(total_Lamount_1974_1978_perelect area_1970 eup demo_female_share_1966 demo_age_15plus_1966 ///
demo_illiterate_1966 demo_pop_ch_1970_1966 	E17ConsSh _cons) b(%12.3fc)  se r2 ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 



*================================================================================
* Table 3's Models (3) and (4) and Appendix B9
* Instrumental Variable Analysis
* x = total NVM subsidy per voter (total_Lamount_1974_1978_perelect)
* y = Park's vote share for Model (1)
* y = Lee's vote share for Model (2)
* IV = te_median1 ts_median1
*================================================================================
eststo clear

foreach x of var total_Lamount_1974_1978_perelect  {

	ivregress 2sls E18ConsSh area_1970 eup ///
	demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 demo_pop_ch_1970_1966 /// 
	E17ConsSh i.CTY_cd (`x'=te_median1 ts_median1 ) , vce(cluster CTY_cd) first


}


eststo 

foreach x of var total_Lamount_1974_1978_perelect  {


	ivregress 2sls E17ConsSh area_1970 eup /// 
	demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 demo_pop_ch_1970_1966 ///
	i.CTY_cd (`x'=te_median1 ts_median1 ) , vce(cluster CTY_cd) first


}

eststo 
esttab, keep(total_Lamount_1974_1978_perelect area_1970 eup demo_female_share_1966 demo_age_15plus_1966 ///
demo_illiterate_1966 demo_pop_ch_1970_1966 E17ConsSh _cons) b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01)  
 
*================================================================================
* Appendix Table B10 
* For Model (1), x = Total number of beneficiary vaillges per voter (total_num_1974_1978_perelect)
* For Model (2), x = total NVM subsidy per population (total_Lamount_1974_1978_d_pop)
* For Model (3), y = difference between the incumbent's vote share and all oppositions (E18_VoteDiff)
*================================================================================

eststo clear 

areg E18ConsSh total_num_1974_1978_perelect area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

areg E18ConsSh total_Lamount_1974_1978_d_pop area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh, absorb(CTY_cd) vce(cluster CTY_cd)
eststo


areg E18_VoteDiff total_Lamount_1974_1978_perelect area_1970 eup ///
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 E17ConsSh, absorb(CTY_cd) vce(cluster CTY_cd)
eststo

 
esttab, order(total_num_1974_1978_perelect total_Lamount_1974_1978_d_pop total_Lamount_1974_1978_perelect) ///
 b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 



*================================================================================
* 5.3 mechanism analysis
*================================================================================

*================================================================================
* Table 4 and Appendix Table B11
* x = total NVM subsidy per voter  (total_Lamount_1974_1978_perelect), 
* y = night time light
*================================================================================
eststo clear

* full control
foreach y of var Lnl1992mean Lnl1996mean Lnl2001mean Lnl2006mean Lnl2011mean {
areg `y' total_Lamount_1974_1978_perelect area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo
}

esttab, b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 


*================================================================================
* Table 5 and Appendix Table B12
* x = total NVM subsidy per voter  (total_Lamount_1974_1978_perelect), 
* For Model (1), y = Difference between share of households with mechanical cultivator in 1970 and in 1980 (cul_197080)
* For Model (2), y = share of households with mechanical cultivator in 2010 (cul_2010) 
* For Model (3), y = share of full-time farming households in (ful_2010) 
* For Model (4), y = change in agricultural population (log, 1970 - 80) (agpop_ch_8070)
* For Model (4), y = Share of population age 55+ in 2010 (pop_old_55_plus_share_2010 )
*================================================================================
eststo clear


foreach y of var cul_197080 cul_2010 ful_2010 agpop_ch_8070 pop_old_55_plus_share_2010 {
areg `y' total_Lamount_1974_1978_perelect area_1970  eup /// 
demo_female_share_1966 demo_age_15plus_1966 demo_illiterate_1966 ///
demo_pop_ch_1970_1966 ///
, absorb(CTY_cd) vce(cluster CTY_cd)
eststo
}

esttab,  b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 



*================================================================================
* Appendix Table C1 descriptive statistics of survey data
*================================================================================
clear
use 2_residential_satisfaction_survey_recoded
sum local_SWB town_belong social happy town_future income length married age male education farmers  

clear
use 3_rural_village_survey_recoded
sum socialact_c Q1421 Q1422  Q1423  Q1424  Q1425  Q1426  Q1427 Q1428 Q067  stay length  male age

clear
use 4_korean_identity_survey_recoded
sum pch_econ pch_pol social_capital ideology policy income education male age 




*================================================================================
* Table 6 Survey and Appendix C2
*================================================================================
clear
use 2_residential_satisfaction_survey_recoded

eststo clear

* models (1) to (3)
foreach y of var local_SWB town_belong social  {
foreach x of var total_Lamount_1974_1978_perelect  {

areg `y' `x' income length married age male education farmers year_fe, absorb(CTY_cd) vce(cluster CTY_cd) 
eststo 

}
}

* model (4)
clear
use 3_rural_village_survey_recoded

foreach y of var socialact_c {
foreach x of var total_Lamount_1974_1978_perelect  {

areg `y' `x'  male age length , absorb(CTY_cd)   vce(cluster CTY_cd) 
eststo 
}
}
 
* models (5) and (6)
clear 
use 4_korean_identity_survey_recoded 


foreach y of var pch_econ pch_pol   {
foreach x of var total_Lamount_1974_1978_perelect {

areg `y' `x' male age education income, absorb(CTY_cd) vce(cluster CTY_cd) 
eststo

}
}

esttab,  b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 


*================================================================================
*  Appendix Table C3 Activities
*================================================================================
* check each community activity seperately 
clear
use 3_rural_village_survey_recoded

eststo clear

foreach y of var Q1421 Q1422  Q1423  Q1424  Q1425  Q1426  Q1427 Q1428 {
foreach x of var total_Lamount_1974_1978_perelect  {

areg `y' `x'  male age length , absorb(CTY_cd)   vce(cluster CTY_cd) 
eststo 
}
}
 
esttab,  b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 



*================================================================================
*  Appendix Table C4
* additional analysis on socla capital and political attitude
*================================================================================
clear
use 2_residential_satisfaction_survey_recoded

eststo clear

* models (1) and (2)
foreach y of var happy town_future   {

foreach x of var total_Lamount_1974_1978_perelect  {

areg `y' `x' income length married age male education farmers year_fe, absorb(CTY_cd) vce(cluster CTY_cd) 
eststo 

}
}


* models (3) and (4) 
use 3_rural_village_survey_recoded

foreach y of var Q067  stay {

foreach x of var total_Lamount_1974_1978_perelect  {


reg `y' `x'  male age length ,    vce(cluster CTY_cd) 
eststo 
}
}
 
* models (5) to (7) 

use 4_korean_identity_survey_recoded 

foreach y of var social_capital ideology policy  {
foreach x of var total_Lamount_1974_1978_perelect {

areg `y' `x' male age education income, absorb(CTY_cd) vce(cluster CTY_cd) 
eststo

}
}

esttab, drop(year_fe)  b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01)   



*================================================================================
* Appendix Table C5
* evaluation on other presidents
*================================================================================
eststo clear


* Q19 = political development, 
* Q20 = deconomic development, 
foreach y of var Q19_1_re Q20_1_re  Q19_3_re Q20_3_re Q19_4_re Q20_4_re Q19_5_re Q20_5_re Q19_6_re Q20_6_re Q19_7_re  Q20_7_re Q19_8_re Q20_8_re  {
foreach x of var total_Lamount_1974_1978_perelect {

areg `y' `x' male age education income, absorb(CTY_cd) vce(cluster CTY_cd) 
eststo

}
}

esttab,  b(%12.3fc) se ar2 nogap label star(+ 0.10 * 0.05 ** 0.01) 

log close
